  $('#search_results').html("<%= escape_javascript render :partial => 'extended_search' %>");
  $('#search_form_div').html("<%= escape_javascript render :partial => 'form' %>");
  
  $('#focus_options ul li a span').removeClass('active');
  
  <% if params[:type].present? %>
  $('#focus_options ul li a span.<%= params[:type].pluralize.downcase %>').addClass('active');
  <% else %>
  $('#focus_options ul li a span.global').addClass('active');
  <% end %>
  
  $('title').text('<%= t('search.name')%> <%= escape_javascript(params[:q].present? ? ": #{params[:q]}" : "")%>');
  
  <% if too_short_query? %>
  $('#too_short_error').show();
  <% else %>
  $('#too_short_error').hide();
  <% end %> 
  
  $('#global_search_input').removeClass("searching");

  setActivityPrivacyTooltips();
